﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Unity;
using Sis.Entities;
using Sis.Repository;

namespace Sis.Service
{
    public class PromotorService : IPromotorService
    {
        [Dependency]
        public IPromotorRepository promoRepo { get; set; }
        public List<Promotor> GetAllFromPromotores(string criterio)
        {
            return promoRepo.GetFroPromorByCriterio(criterio);
        }

        public void AddPromotor(Promotor promotor)
        {
            promoRepo.AddPromotor(promotor);
        }

        public Promotor GetFromPromotorByID(int id)
        {
            return promoRepo.promotorByID(id);
        }

        public List<Promotor> GetPromotores()
        {
            return promoRepo.GetPromotores();
        }
    }
}
